package com.blue.bluecode;

import android.app.Activity;
import android.os.Bundle;
import android.widget.SeekBar;
import android.widget.TextView;


public class SeekBarActivity extends Activity {

    private SeekBar sb;
    private TextView tvSeekBar;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_seek_bar);
        getActionBar().setDisplayHomeAsUpEnabled(true);

        sb = (SeekBar) findViewById(R.id.sbSeekBar);
        tvSeekBar = (TextView) findViewById(R.id.tvSeekBar);

        sb.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
            @Override
            public void onProgressChanged(SeekBar seekBar, int i, boolean b) {
                tvSeekBar.setText(i+" == "+b);
            }

            @Override
            public void onStartTrackingTouch(SeekBar seekBar) {

            }

            @Override
            public void onStopTrackingTouch(SeekBar seekBar) {

            }
        });
    }
}
